# @Time : 2024/8/1 9:30
# @Author : Adam
# @Version : v1.0
# @IDE : PyCharm
# @Project : tracer

from django.template import Library

register = Library()


# 定制局部值
@register.simple_tag
def string_just(num):
    if num < 100:
        num = str(num).rjust(3, '0')
    return '#{}'.format(num)
